package com.example.neusoftfood_c213_zhong.model;

import com.example.neusoftfood_c213_zhong.common.Constants;
import com.example.neusoftfood_c213_zhong.listener.RetrofitListener;
import com.example.neusoftfood_c213_zhong.service.ShopService;

import retrofit2.Call;

public class ShopModel extends RetrofitBaseModel{
    private ShopService shopService;
    public ShopModel()
    {
        this.shopService = retrofit.create(ShopService.class);
    }
    public void getAllShops(RetrofitListener listener) {
        Call call = shopService.getAllShops();
        bindCallback(call,listener, Constants.GETALLSHOPS);
    }


    public void isCollected(String user_id, int shop_food_id, int flag,RetrofitListener listener) {
        Call call = shopService.isCollected(user_id,shop_food_id,flag);
        bindCallback(call,listener, Constants.ISCOLLECTED);
    }
    public  void userCollectShop(String user_id, int shop_id,RetrofitListener listener)
    {
        Call call = shopService.userCollectShop(user_id,shop_id);
        bindCallback(call,listener, Constants.USERCOLLECTSHOP);

    }


}
